home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / stut_src / debug_pu.h < prev    next >
C/C++ Source or Header  |  1996-06-04  |  2KB  |  75 lines

  1. /*
  2.  * debug_public.h
  3.  *
  4.  * Purpose:
  5.  * --------
  6.  * Interface publique pour debug
  7.  *
  8.  * History:
  9.  * --------
  10.  * 25.09.94: fplanque: Created
  11.  */
  12.  
  13. #include "WIN_PU.H"
  14.  
  15. /*
  16.  * ------------------------- MEMBRES PUBLICS ----------------------------
  17.  */
  18.     /*
  19.      * Fenˆtre de d‚bugging (texte) 
  20.      */
  21.     extern WIPARAMS    *    G_debug_window;
  22.     /*
  23.      * Tampon de g‚n‚ration des messages de debug:
  24.      */
  25.     extern char Tsz_DebugMsg[];
  26.  
  27. /*
  28.  * ------------------------------ INLINES -------------------------------
  29.  */
  30.  
  31. #define    WATCHINT( arg_int )    \
  32.                 sprintf( Tsz_DebugMsg, #arg_int "=%d", arg_int );    \
  33.                 debug_AddLine( Tsz_DebugMsg )
  34.  
  35. #define    TRACE0( arg_psz )        \
  36.                 strcpy( Tsz_DebugMsg, arg_psz );     \
  37.                 debug_AddLine( Tsz_DebugMsg )
  38. #define    TRACE1( arg_psz, arg1 )        \
  39.                 sprintf( Tsz_DebugMsg, arg_psz, arg1 );     \
  40.                 debug_AddLine( Tsz_DebugMsg )
  41. #define    TRACE2( arg_psz, arg1, arg2 )        \
  42.                 sprintf( Tsz_DebugMsg, arg_psz, arg1, arg2 );     \
  43.                 debug_AddLine( Tsz_DebugMsg )
  44. #define    TRACE3( arg_psz, arg1, arg2, arg3 )        \
  45.                 sprintf( Tsz_DebugMsg, arg_psz, arg1, arg2, arg3 );     \
  46.                 debug_AddLine( Tsz_DebugMsg )
  47.  
  48.  
  49. /*
  50.  * ----------------------- OPERATIONS PUBLIQUES -------------------------
  51.  */
  52.  
  53.     /*
  54.      * Constructeur/Initialisation:
  55.      */
  56.     void    debug_Construct( void );
  57.     
  58.     /*
  59.      * Cr‚ation des params n‚cessaires… l'aff du log ds une fenetre:
  60.      */
  61.     int    debug_CreateWinText( 
  62.                 TEXT_DRAWPAR * *    ppTextDrawPar );
  63.     
  64.     /*
  65.      * Aff une ligne ds log avec PING
  66.      */
  67.     void    signale( 
  68.                 const char * inf );        /* In: texte … dupliker et ins‚rer ds Log */
  69.  
  70.     /*
  71.      * Aff une ligne ds log
  72.      */
  73.     void    debug_AddLine( 
  74.                 const char * inf );        /* In: texte … dupliker et ins‚rer ds Log */
  75.